﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>salary_standard</title>
    <script src="~/lib/axios/dist/axios.js"></script>
    <script src="~/lib/vue/dist/vue.js"></script>
    <script src="~/lib/element-ui/lib/index.js"></script>
    <link href="~/lib/element-ui/lib/theme-chalk/index.css" rel="stylesheet" />
</head>
<body>
    <div id="app">
        <el-container>
            <el-header>
                <el-card class="box-card" style="height: 65px">
                    <el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true" size="mini">
                        <el-form-item label="薪酬发放方式" prop="type" label-width="110px">
                                <el-select v-model="form.type" placeholder="请选择薪酬发放方式" style="width: 160px ">
                                    <el-option label="I级机构发放方式" value="I级机构发放方式"></el-option>
                                    <el-option label="II级机构发放方式" value="II级机构发放方式"></el-option>
                                    <el-option label="III级机构发放方式" value="III级机构发放方式"></el-option>
                                </el-select>
                        </el-form-item>
                        <el-form-item>
                            <template>
                                <el-button type="primary" style="width: 50px;">查询</el-button>
                            </template>
                        </el-form-item>
                    </el-form>
                </el-card>
            </el-header>
            <el-main>
                <el-card class="box-card">
                    <el-table :data="list" style="width: 100%" border stripe show-summary>
                        <el-table-column type="index"
                                         label="序号"
                                         width="150px"
                                         align="center">
                        </el-table-column>
                        <el-table-column prop="first_kind_name"
                                         label="I级机构名"
                                         align="center">
                        </el-table-column>
                        <el-table-column prop="second_kind_name"
                                         label="II级机构名"
                                         align="center">
                        </el-table-column>
                        <el-table-column prop="third_kind_name"
                                         label="III级机构名"
                                         align="center">
                        </el-table-column>
                        <el-table-column prop="human_amount"
                                         label="人数"
                                         align="center">
                        </el-table-column>
                        <el-table-column prop="salary_standard_sum"
                                         label="基本薪酬总额(元)"
                                         align="center">
                        </el-table-column>
                        <el-table-column label="操作" align="center">
                            <template slot-scope="scope">
                                <el-button size="mini" type="primary" @@click="cz(scope.row)">登记</el-button>
                            </template>
                        </el-table-column>
                    </el-table>

                    <el-row>
                        <el-col :span="1">
                            <el-pagination v-on:size-change="handleSizeChange"
                                           v-on:current-change="handleCurrentChange"
                                           :current-page="queryinfo.currentPage"
                                           :page-sizes="[1, 2, 3, 4]"
                                           :page-size="queryinfo.pageSize"
                                           layout="total, sizes, prev, pager, next, jumper"
                                           :total="total">
                            </el-pagination>
                        </el-col>
                    </el-row>
                </el-card>
            </el-main>
        </el-container>
    </div>
    <script type="text/javascript">
        var vm = new Vue({
            el: "#app",
            data: {
                list: [],
                queryinfo: {
                    currentPage: 1,//当前页
                    pageSize: 3//总页数
                },
                total: 1,//总条数
                form: {
                    type: '',
                },
                rules: {
                    type: [
                        { required: true, message: '请选择薪酬发放方式', trigger: 'change' }
                    ],
                }
            },
            methods: {
                cz(row) {
                    location.href = "/salary_grant/salary_grantInsert/" + row.third_kind_id;
                },
                fill() {
                     //人力资源未发工资查询
                    axios.get('/salary_grant/FenY', {
                        params: {
                            currentPage: this.queryinfo.currentPage,
                            pageSize: this.queryinfo.pageSize
                        }
                    })
                        .then(res => {
                            console.info(res);
                            this.list = res.data.Data;
                            this.total = res.data.Row;
                        })
                        .catch(err => {
                            console.info(err);
                        });
                },
                 //分页总页数改变事件
                handleSizeChange(val) {
                    this.queryinfo.pageSize = val;
                    this.fill();
                },
                 //分页当前页改变事件
                handleCurrentChange(val) {
                    this.queryinfo.currentPage = val;
                    this.fill();
                }
            },
            //可以对vue的数据和方法进行操作,不能对DOM进行操作
            created: function () {
                this.fill();
            }
        });
    </script>
    <style scoped>
        element.style {
            height: 100%;
            width: 1239px;
        }

        .el-button.is-circle {
            border-radius: 50%;
            padding: 12px;
            position: relative;
            top: -10px;
            right: -570px;
        }
    </style>
</body>
</html>
